package com.nf.text;

import com.nf.entity.Car;
import com.nf.entity.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Test02 {
    public static void main(String[] args){
        ApplicationContext ac = new ClassPathXmlApplicationContext("applicationContext.xml");
        Person p1 = (Person)ac.getBean("p1");
        System.out.println(p1);
        System.out.println(p1.getCar().getName());

    }
}
